/**
 * @author yxw
 * date : 2013年11月6日 下午4:32:51 
 */
package com.tzinfo.tzt.activity;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import android.annotation.SuppressLint;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.webkit.DownloadListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.tzinfo.tzt.R;
import com.tzinfo.tzt.util.CodingTools;

public class VideoWebViewActivity extends BaseActivity{
	private String videoUrl="";
	private Intent thisIntent;
	
	//UI组件
	private WebView webView;
	private MediaPlayer mediaPlayer;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_webview);
		init();
	}
	private void init(){
		
		thisIntent=getIntent();
		videoUrl=thisIntent.getStringExtra("videoUrl");
//		videoUrl=CodingTools.changeCNCode(videoUrl, "utf-8");
//		try {
//			videoUrl=URLEncoder.encode(videoUrl,"utf-8");
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		Log.e("videoUrl",videoUrl);
//		webView=(WebView) this.findViewById(R.id.webview);
//		webView.loadUrl(videoUrl);
		Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(videoUrl));
        startActivity(intent);
        
//		mediaPlayer = MediaPlayer.create(this, Uri.parse(videoUrl));
//		mediaPlayer.start();

	}
	
	
}

